package org.hzandyy.framework.liteflow.flow;

import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeIfComponent;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.math.RandomUtils;

/**
 * @author Hu Zhi
 * @since 2023/12/7 16:42
 */
@LiteflowComponent("node_if")
@Slf4j
public class NodeIfCmp extends NodeIfComponent {

    @Override
    public boolean processIf() throws Exception {
        boolean result = RandomUtils.nextBoolean();
        log.info("random if result [{}]", result);
        return result;
    }

}
